// @vue/component
import Pagination from "@/components/Pagination/index.vue";
import {stockList} from "@/api/goods";

export default {
  name: 'GoodsStock',

  components: {Pagination},

  mixins: [],

  props: {},

  data () {
    return {
      stockQuery:{
        goodsName:'',
        userName:'',
        goodsAction:'',
        start_date:'',
        end_date:'',
        page_num:1,
        page_size:10,
        total:0,
      },
      stockListData:[],
      listLoading:false
    }
  },

  computed: {},

  watch: {},

  created () {
    this.getStockList()
  },

  methods: {
    getStockList(){
      this.listLoading = true
      stockList(this.stockQuery).then(res=>{
          this.stockListData = res.data.data
          this.listLoading = false
          this.stockQuery.total = res.data.page_info.count
      })
    }
  }
}
